package com.whu.MenuHub.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.whu.MenuHub.domain.User;
import com.whu.MenuHub.exception.MenuHubException;

import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {
    public User getUserByUserName(String name);
    public User getUserByUserID(Integer id);
    public User insertUser(User user) throws MenuHubException;
    public void updateUserByID(User user,Boolean encoder)throws MenuHubException;
    public void deleteUserByID(Integer id)throws MenuHubException;
    public IPage<User> findUsers(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    public List<User> getAllUser();
    List<User>getRecentActiveUser();
    List<User> getHistoryActiveUser();

    int getRankNum(Integer userID);
}
